package com.sunda.spmsweb.util;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.sunda.spmscommon.feign.IFeignServiceCommon;
import org.apache.commons.lang.StringEscapeUtils;
import org.springframework.beans.factory.annotation.Autowired;

import java.text.SimpleDateFormat;
import java.util.*;

/**
 * @program: spms
 * @description: BarCodeUtil
 * @author: Wayne Wu
 * @create: 2021-06-28 09:52
 **/

public class Test {

    String [] materialSapX = {"210041265", "210041305", "210041134", "210004756", "210038090", "170003161", "210003877", "210002450", "210002420", "180001508", "210038794", "170002948", "210038979", "210018358" ,"210031007", "210014816", "210031568", "210018156", "210031173", "210031584"};
    String [] materialSapM = {"160003881", "130016846", "160001352", "160003629", "210028514", "210025338", "210023996", "210022570", "210027187", "130016395", "170000846", "160029280", "190000289", "170003115", "130005548", "210035928", "160005938", "160010087", "210022727", "130008308"};

    @Autowired
    IFeignServiceCommon iFeignServiceCommon;

    public static void main(String[] args) throws Exception {

        System.out.println("==1==" + "φ100xZ17-M10/HT200");
        System.out.println("==2==" + "φ100xZ17-M10/HT200".toUpperCase());

        SimpleDateFormat sdf = new SimpleDateFormat("YYYYMMdd");
        SimpleDateFormat sdf1 = new SimpleDateFormat("YYYY-MM-dd");
        String date = "20210809";
        System.out.println(sdf.parse(date));
        System.out.println(sdf1.format(sdf.parse(date)));

        System.out.println("==123===" + sdf1.format(new Date()));

        List<Map<String, Object>> list = new ArrayList<>();
        System.out.println("====" + list.size());

        Map<String, Object> map = new HashMap<String, Object>();
        map.put("q1", "qw1");
        map.put("q2", "qw2");
        map.put("q3", "qw3");
        for (Object obj : map.values()){
            System.out.println(obj);
        }
        System.out.println(map.containsKey("1q"));
        for (Map.Entry<String, Object> entry : map.entrySet()){
            System.out.println(entry.getKey() + "   " + entry.getValue());
        }

        System.out.println(String.format("%.3f", (1 / 1) * 5.0));
        String data = "{\"code\":100,\"msg\":\"请求失败\",\"data\":{\"error\":\"{\\\"sapReturnedData\\\":{\\\"RESPONSE\\\":{\\\"ESB_ATTRS\\\":{\\\"Type\\\":\\\"IMPROT_AND_CONFIRM\\\",\\\"RETURN_CODE\\\":\\\"00000000\\\",\\\"Application_ID\\\":\\\"00020000000002\\\",\\\"RETURN_DESC\\\":\\\"\\\",\\\"Transaction_ID\\\":\\\"803083ed-2cf4-4ef1-ac18-9f22ce37497b\\\"},\\\"RETURN_DATA\\\":{\\\"LOG\\\":\\\"10--PL00027419---\\\",\\\"EX_MESSAGE\\\":\\\"操作中止！装箱单环节1120已确认,请先取消确认再修改数据\\\",\\\"EX_TYPE\\\":\\\"E\\\"}}},\\\"dataToSap\\\":{\\\"REQUEST\\\":{\\\"ESB_ATTRS\\\":{\\\"App_ID\\\":\\\"SPMS\\\",\\\"Application_ID\\\":\\\"00020000000002\\\",\\\"Transaction_ID\\\":\\\"803083ed-2cf4-4ef1-ac18-9f22ce37497b\\\"},\\\"REQUEST_DATA\\\":{\\\"Head\\\":{\\\"imImportFlag\\\":\\\"A\\\"},\\\"Type\\\":\\\"IMPROT_AND_CONFIRM\\\",\\\"MapItems\\\":{\\\"PT_INPUT_LIST\\\":[{\\\"zgfs\\\":\\\"AA\\\",\\\"wxBrand\\\":\\\"1\\\",\\\"aemng\\\":\\\"0\\\",\\\"matnr\\\":\\\"210009196\\\",\\\"del\\\":\\\"\\\",\\\"pkmakYn\\\":\\\"N\\\",\\\"xdnum\\\":\\\"PL00027419\\\",\\\"sealn\\\":\\\"PL00027419\\\",\\\"bzgg\\\":\\\"BB\\\",\\\"importFlag\\\":\\\"A\\\",\\\"kgBrgew\\\":\\\"0\\\",\\\"zspmsTaskid\\\":\\\"1aa78946e675407bbbdfeaa24a214bb6\\\",\\\"zxdidEx\\\":\\\"10\\\",\\\"cabno\\\":\\\"ABCD1234567\\\",\\\"jzry\\\":\\\"wayne\\\",\\\"cpsjpjBrgew\\\":\\\"\\\",\\\"zh\\\":\\\"\\\",\\\"azdat\\\":\\\"20210803\\\",\\\"vrkme\\\":\\\"PCS\\\",\\\"cdQty\\\":\\\"\\\",\\\"maktx\\\":\\\"200211193同步带托轮轴套_KL0902.02.04-02\\\",\\\"meins\\\":\\\"PCS\\\",\\\"colorCode\\\":\\\"\\\",\\\"ameng\\\":\\\"0\\\",\\\"algort\\\":\\\"1061\\\",\\\"algobe\\\":\\\"南沙仓\\\",\\\"jyjg\\\":\\\"ok\\\",\\\"mark\\\":\\\"PL00027419\\\"}]},\\\"Operation\\\":\\\"Z_ZXD_IMPROT_AND_CONFIRM\\\"}}}}\"}}";
        JSONObject doc = JSON.parseObject(data);
        System.out.println(doc.getJSONObject("data").getString("error"));
        System.out.println(StringEscapeUtils.unescapeJavaScript(data));

    }


    /** 造备件贸易混装装箱单数据，包括装箱单、箱单明细、箱单明细箱码关系、备件储位库存、备件仓库库存、贸易货 160029280 储位库存 */
    static void createPackageListMX(){
        for (int i = 400; i < 500; i++){
            String packageNote = "SP-00000000" + String.format("%03d", i + 1);
            String boxNote = packageNote + "-0102";
            String packageList = "SP" + String.format("%08d", i + 1);
            System.out.println("\nINSERT INTO SAP_BOX_NOTE (PACKAGE_NOTE, BOX_NOTE, BOX_MATERIAL_NAME, TOTAL_QTY, BOX_GROSS_WEIGHT, BOX_VOLUME, BOX_LENGTH, BOX_WIDTH, BOX_HEIGHT, BOX_COLOR, BOX_QTY_RECEIVED, ITEM_STATUS, REMARKS) VALUES ('" + packageNote + "','" + boxNote + "','木箱',5,0.000,0.000,0.000,0.000,0.000,'','',0,'');");
            System.out.println("INSERT INTO SAP_BOX_NOTE_DTL (PACKAGE_NOTE, ITEM, BOX_NOTE, PACKAGE_POSNR, MATERIAL_NO, SPECS, QUANTITY, BASIC_UNIT, SRM_CONTRACT_NO, PURCHASE_NO, PURCHASE_NO_ITEM, DELIVERY_NOTE_SAP, DELIVERY_NOTE_SAP_ITEM, DOMESTIC_QTY_RECEIVABLE, DOMESTIC_QTY_RECEIVED) VALUES ('" + packageNote + "','1','" + boxNote + "','1','180001508','',5,'PCS','','','','" + "9900000000" + "','10', 1, 5);");
            System.out.println("INSERT INTO SAP_BOX_NOTE_DTL (PACKAGE_NOTE, ITEM, BOX_NOTE, PACKAGE_POSNR, MATERIAL_NO, SPECS, QUANTITY, BASIC_UNIT, SRM_CONTRACT_NO, PURCHASE_NO, PURCHASE_NO_ITEM, DELIVERY_NOTE_SAP, DELIVERY_NOTE_SAP_ITEM, DOMESTIC_QTY_RECEIVABLE, DOMESTIC_QTY_RECEIVED) VALUES ('" + packageNote + "','2','" + boxNote + "','1','210003877','',20,'PCS','','','','" + "9900000000" + "','10', 1, 20);");
            System.out.println("INSERT INTO SAP_PACKAGE_LIST (PACKAGE_LIST, CUSTOMER, SPARE_PARTS, PLANNED_CABINETS_QTY, FROM_PORT, FROM_PORT_NAME, TO_PORT, TO_PORT_NAME, SHIP_COMPANY, CABINET_MODEL, PLANNER, LOADER, ACTUAL_LOADING_DATE, SPMS_STATUS) VALUES ('" + packageList + "', 'GF03', '否', 2, 'CNFOC', '福州', 'GHTEM', '特马', '', '20GP', 'IT_WURQ', '', '', '0');");

            System.out.println("INSERT INTO SAP_PACKAGE_LIST_DTL (PACKAGE_LIST, ITEM, DATE_OF_LOADING, LOADING_WERKS, LOADING_WHS_LOCATION_CODE, CABINET_SERIAL_NUMBER, GOODS_TYPE, RECEIVING_WERKS, ACTUAL_RECEIVING_WERKS, CABINET_NUMBER, LEAD_SEAL, MATERIAL_NO, SHIPMENT_CATEGORY, PLANNED_PACKING_QTY, BASIC_UNIT, PLANNED_PACKING_NUMBER, PACKING_UNIT, CABINET_WEIGHT, WEIGHT_UNIT, CABINET_VOLUME, VOLUME_UNIT, TRAILER_LINE, TRAILER_LINE_DESC, SPMS_STATUS, WHS_OUT_UUID, TEMP_STORAGE, UNPLANNED, ACTUAL_OPERATE_QTY, CONTAINER_BRAND, COLOR_NUMBER, THICKNESS, ACTUAL_AVG_GROSS_WEIGHT, ACTUAL_PACKING_NUMBER, CUSTOMS_DECLARATION_NUMBER, PACKING_SPEC, LOADING_TYPE) VALUES ('" + packageList + "', '10', '20210701', 'CN01', '1061', '01', 'M', 'GH01', '', '', '', '160029280', '五金_农具五金_铁锹', '10', 'PCS', '10', 'PCS', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '');");
            System.out.println("INSERT INTO SAP_PACKAGE_LIST_DTL (PACKAGE_LIST, ITEM, DATE_OF_LOADING, LOADING_WERKS, LOADING_WHS_LOCATION_CODE, CABINET_SERIAL_NUMBER, GOODS_TYPE, RECEIVING_WERKS, ACTUAL_RECEIVING_WERKS, CABINET_NUMBER, LEAD_SEAL, MATERIAL_NO, SHIPMENT_CATEGORY, PLANNED_PACKING_QTY, BASIC_UNIT, PLANNED_PACKING_NUMBER, PACKING_UNIT, CABINET_WEIGHT, WEIGHT_UNIT, CABINET_VOLUME, VOLUME_UNIT, TRAILER_LINE, TRAILER_LINE_DESC, SPMS_STATUS, WHS_OUT_UUID, TEMP_STORAGE, UNPLANNED, ACTUAL_OPERATE_QTY, CONTAINER_BRAND, COLOR_NUMBER, THICKNESS, ACTUAL_AVG_GROSS_WEIGHT, ACTUAL_PACKING_NUMBER, CUSTOMS_DECLARATION_NUMBER, PACKING_SPEC, LOADING_TYPE) VALUES ('" + packageList + "', '20', '20210701', 'CN01', '1011', '02', 'X', 'GH01', '', '', '', '180001508', '五金_农具五金_铁锹', '5', 'PCS', '5', 'PCS', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '');");
            System.out.println("INSERT INTO SAP_PACKAGE_LIST_DTL (PACKAGE_LIST, ITEM, DATE_OF_LOADING, LOADING_WERKS, LOADING_WHS_LOCATION_CODE, CABINET_SERIAL_NUMBER, GOODS_TYPE, RECEIVING_WERKS, ACTUAL_RECEIVING_WERKS, CABINET_NUMBER, LEAD_SEAL, MATERIAL_NO, SHIPMENT_CATEGORY, PLANNED_PACKING_QTY, BASIC_UNIT, PLANNED_PACKING_NUMBER, PACKING_UNIT, CABINET_WEIGHT, WEIGHT_UNIT, CABINET_VOLUME, VOLUME_UNIT, TRAILER_LINE, TRAILER_LINE_DESC, SPMS_STATUS, WHS_OUT_UUID, TEMP_STORAGE, UNPLANNED, ACTUAL_OPERATE_QTY, CONTAINER_BRAND, COLOR_NUMBER, THICKNESS, ACTUAL_AVG_GROSS_WEIGHT, ACTUAL_PACKING_NUMBER, CUSTOMS_DECLARATION_NUMBER, PACKING_SPEC, LOADING_TYPE) VALUES ('" + packageList + "', '30', '20210701', 'CN01', '1011', '02', 'X', 'GH01', '', '', '', '210003877', '五金_农具五金_铁锹', '20', 'PCS', '20', 'PCS', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '');");

            System.out.println("INSERT INTO SAP_PACKAGE_BOX (PACKAGE_LIST, ITEM, BOX_NOTE) VALUES ('" + packageList + "', '20', '" + boxNote + "');");
            System.out.println("INSERT INTO SAP_PACKAGE_BOX (PACKAGE_LIST, ITEM, BOX_NOTE) VALUES ('" + packageList + "', '30', '" + boxNote + "');");
            System.out.println("INSERT INTO WHS_INVENTORY_INFO (WERKS, WHS_LOCATION_CODE, QUANTITY, UPDATE_USER, BOX_NOTE) VALUES ('CN01', '1011', 1, '999947', '" + boxNote + "');");
            System.out.println("INSERT INTO WHS_STORAGE_INVENTORY (UUID, BOX_NOTE, QUANTITY, AVAILABLE_QTY) VALUES ('b95946ac1dab42b79ade3438acb0b523', '" + boxNote + "', 1, 1);");

        }
    }

    /** 造备件货装箱单数据、箱码、箱码明细数据 */
    static void createPackageListX(){
        for (int i = 200; i < 300; i ++){
            //'SP-12345678001-0202'
            String packageNote = "SP-12345678" + String.format("%03d", i + 1);
            String boxNote1 = packageNote + "-0102";
            String boxNote2 = packageNote + "-0202";
            String packageList = "SP" + String.format("%08d", i + 1);
            System.out.println("\nINSERT INTO SAP_BOX_NOTE (PACKAGE_NOTE, BOX_NOTE, BOX_MATERIAL_NAME, TOTAL_QTY, BOX_GROSS_WEIGHT, BOX_VOLUME, BOX_LENGTH, BOX_WIDTH, BOX_HEIGHT, BOX_COLOR, BOX_QTY_RECEIVED, ITEM_STATUS, REMARKS) VALUES ('" + packageNote + "','" + boxNote1 + "','木箱',5,0.000,0.000,0.000,0.000,0.000,'','',0,'');");
            System.out.println("INSERT INTO SAP_BOX_NOTE (PACKAGE_NOTE, BOX_NOTE, BOX_MATERIAL_NAME, TOTAL_QTY, BOX_GROSS_WEIGHT, BOX_VOLUME, BOX_LENGTH, BOX_WIDTH, BOX_HEIGHT, BOX_COLOR, BOX_QTY_RECEIVED, ITEM_STATUS, REMARKS) VALUES ('" + packageNote + "','" + boxNote2 + "','木箱',5,0.000,0.000,0.000,0.000,0.000,'','',0,'');");
            System.out.println("INSERT INTO SAP_BOX_NOTE_DTL (PACKAGE_NOTE, ITEM, BOX_NOTE, PACKAGE_POSNR, MATERIAL_NO, SPECS, QUANTITY, BASIC_UNIT, SRM_CONTRACT_NO, PURCHASE_NO, PURCHASE_NO_ITEM, DELIVERY_NOTE_SAP, DELIVERY_NOTE_SAP_ITEM, DOMESTIC_QTY_RECEIVABLE, DOMESTIC_QTY_RECEIVED) VALUES ('" + packageNote + "','1','" + boxNote1 + "','1','210002450','',10,'PCS','','','','" + "9900000000" + "','10', 1, 10);");
            System.out.println("INSERT INTO SAP_BOX_NOTE_DTL (PACKAGE_NOTE, ITEM, BOX_NOTE, PACKAGE_POSNR, MATERIAL_NO, SPECS, QUANTITY, BASIC_UNIT, SRM_CONTRACT_NO, PURCHASE_NO, PURCHASE_NO_ITEM, DELIVERY_NOTE_SAP, DELIVERY_NOTE_SAP_ITEM, DOMESTIC_QTY_RECEIVABLE, DOMESTIC_QTY_RECEIVED) VALUES ('" + packageNote + "','1','" + boxNote2 + "','2','180001508','',5,'PCS','','','','" + "9900000000" + "','10', 1, 5);");
            System.out.println("INSERT INTO SAP_BOX_NOTE_DTL (PACKAGE_NOTE, ITEM, BOX_NOTE, PACKAGE_POSNR, MATERIAL_NO, SPECS, QUANTITY, BASIC_UNIT, SRM_CONTRACT_NO, PURCHASE_NO, PURCHASE_NO_ITEM, DELIVERY_NOTE_SAP, DELIVERY_NOTE_SAP_ITEM, DOMESTIC_QTY_RECEIVABLE, DOMESTIC_QTY_RECEIVED) VALUES ('" + packageNote + "','1','" + boxNote2 + "','2','210003877','',20,'PCS','','','','" + "9900000000" + "','10', 1, 20);");
            System.out.println("INSERT INTO WHS_INVENTORY_INFO (WERKS, WHS_LOCATION_CODE, QUANTITY, UPDATE_USER, BOX_NOTE) VALUES ('CN01', '1061', 1, '999947', '" + boxNote1 + "');");
            System.out.println("INSERT INTO WHS_INVENTORY_INFO (WERKS, WHS_LOCATION_CODE, QUANTITY, UPDATE_USER, BOX_NOTE) VALUES ('CN01', '1061', 1, '999947', '" + boxNote2 + "');");
            System.out.println("INSERT INTO WHS_STORAGE_INVENTORY (UUID, BOX_NOTE, QUANTITY, AVAILABLE_QTY) VALUES ('b95946ac1dab42b79ade3438acb0b537', '" + boxNote1 + "', 1, 1);");
            System.out.println("INSERT INTO WHS_STORAGE_INVENTORY (UUID, BOX_NOTE, QUANTITY, AVAILABLE_QTY) VALUES ('b95946ac1dab42b79ade3438acb0b537', '" + boxNote2 + "', 1, 1);");

            System.out.println("INSERT INTO SAP_PACKAGE_LIST (PACKAGE_LIST, CUSTOMER, SPARE_PARTS, PLANNED_CABINETS_QTY, FROM_PORT, FROM_PORT_NAME, TO_PORT, TO_PORT_NAME, SHIP_COMPANY, CABINET_MODEL, PLANNER, LOADER, ACTUAL_LOADING_DATE, SPMS_STATUS) VALUES ('" + packageList + "', 'GF03', '否', 2, 'CNFOC', '福州', 'GHTEM', '特马', '', '20GP', 'IT_WURQ', '', '', '0');");
            System.out.println("INSERT INTO SAP_PACKAGE_LIST_DTL (PACKAGE_LIST, ITEM, DATE_OF_LOADING, LOADING_WERKS, LOADING_WHS_LOCATION_CODE, CABINET_SERIAL_NUMBER, GOODS_TYPE, RECEIVING_WERKS, ACTUAL_RECEIVING_WERKS, CABINET_NUMBER, LEAD_SEAL, MATERIAL_NO, SHIPMENT_CATEGORY, PLANNED_PACKING_QTY, BASIC_UNIT, PLANNED_PACKING_NUMBER, PACKING_UNIT, CABINET_WEIGHT, WEIGHT_UNIT, CABINET_VOLUME, VOLUME_UNIT, TRAILER_LINE, TRAILER_LINE_DESC, SPMS_STATUS, WHS_OUT_UUID, TEMP_STORAGE, UNPLANNED, ACTUAL_OPERATE_QTY, CONTAINER_BRAND, COLOR_NUMBER, THICKNESS, ACTUAL_AVG_GROSS_WEIGHT, ACTUAL_PACKING_NUMBER, CUSTOMS_DECLARATION_NUMBER, PACKING_SPEC, LOADING_TYPE) VALUES ('" + packageList + "', '10', '20210701', 'CN01', '1061', '01', 'X', 'GH01', '', '', '', '210002450', '五金_农具五金_铁锹', '10', 'PCS', '10', 'PCS', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '');");
            System.out.println("INSERT INTO SAP_PACKAGE_LIST_DTL (PACKAGE_LIST, ITEM, DATE_OF_LOADING, LOADING_WERKS, LOADING_WHS_LOCATION_CODE, CABINET_SERIAL_NUMBER, GOODS_TYPE, RECEIVING_WERKS, ACTUAL_RECEIVING_WERKS, CABINET_NUMBER, LEAD_SEAL, MATERIAL_NO, SHIPMENT_CATEGORY, PLANNED_PACKING_QTY, BASIC_UNIT, PLANNED_PACKING_NUMBER, PACKING_UNIT, CABINET_WEIGHT, WEIGHT_UNIT, CABINET_VOLUME, VOLUME_UNIT, TRAILER_LINE, TRAILER_LINE_DESC, SPMS_STATUS, WHS_OUT_UUID, TEMP_STORAGE, UNPLANNED, ACTUAL_OPERATE_QTY, CONTAINER_BRAND, COLOR_NUMBER, THICKNESS, ACTUAL_AVG_GROSS_WEIGHT, ACTUAL_PACKING_NUMBER, CUSTOMS_DECLARATION_NUMBER, PACKING_SPEC, LOADING_TYPE) VALUES ('" + packageList + "', '20', '20210701', 'CN01', '1061', '02', 'X', 'GH01', '', '', '', '180001508', '五金_农具五金_铁锹', '5', 'PCS', '5', 'PCS', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '');");
            System.out.println("INSERT INTO SAP_PACKAGE_LIST_DTL (PACKAGE_LIST, ITEM, DATE_OF_LOADING, LOADING_WERKS, LOADING_WHS_LOCATION_CODE, CABINET_SERIAL_NUMBER, GOODS_TYPE, RECEIVING_WERKS, ACTUAL_RECEIVING_WERKS, CABINET_NUMBER, LEAD_SEAL, MATERIAL_NO, SHIPMENT_CATEGORY, PLANNED_PACKING_QTY, BASIC_UNIT, PLANNED_PACKING_NUMBER, PACKING_UNIT, CABINET_WEIGHT, WEIGHT_UNIT, CABINET_VOLUME, VOLUME_UNIT, TRAILER_LINE, TRAILER_LINE_DESC, SPMS_STATUS, WHS_OUT_UUID, TEMP_STORAGE, UNPLANNED, ACTUAL_OPERATE_QTY, CONTAINER_BRAND, COLOR_NUMBER, THICKNESS, ACTUAL_AVG_GROSS_WEIGHT, ACTUAL_PACKING_NUMBER, CUSTOMS_DECLARATION_NUMBER, PACKING_SPEC, LOADING_TYPE) VALUES ('" + packageList + "', '30', '20210701', 'CN01', '1061', '02', 'X', 'GH01', '', '', '', '210003877', '五金_农具五金_铁锹', '20', 'PCS', '20', 'PCS', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '');");

            System.out.println("INSERT INTO SAP_PACKAGE_BOX (PACKAGE_LIST, ITEM, BOX_NOTE) VALUES ('" + packageList + "', '10', '" + boxNote1 + "');");
            System.out.println("INSERT INTO SAP_PACKAGE_BOX (PACKAGE_LIST, ITEM, BOX_NOTE) VALUES ('" + packageList + "', '20', '" + boxNote2 + "');");
            System.out.println("INSERT INTO SAP_PACKAGE_BOX (PACKAGE_LIST, ITEM, BOX_NOTE) VALUES ('" + packageList + "', '30', '" + boxNote2 + "');");
        }

        for (int i = 300; i < 400; i ++){
            //'SP-12345678001-0202'
            String packageNote = "SP-00000000" + String.format("%03d", i + 1);
            String boxNote1 = packageNote + "-0102";
            String boxNote2 = packageNote + "-0202";
            String packageList = "SP" + String.format("%08d", i + 1);
            System.out.println("\nINSERT INTO SAP_BOX_NOTE (PACKAGE_NOTE, BOX_NOTE, BOX_MATERIAL_NAME, TOTAL_QTY, BOX_GROSS_WEIGHT, BOX_VOLUME, BOX_LENGTH, BOX_WIDTH, BOX_HEIGHT, BOX_COLOR, BOX_QTY_RECEIVED, ITEM_STATUS, REMARKS) VALUES ('" + packageNote + "','" + boxNote1 + "','木箱',5,0.000,0.000,0.000,0.000,0.000,'','',0,'');");
            System.out.println("INSERT INTO SAP_BOX_NOTE (PACKAGE_NOTE, BOX_NOTE, BOX_MATERIAL_NAME, TOTAL_QTY, BOX_GROSS_WEIGHT, BOX_VOLUME, BOX_LENGTH, BOX_WIDTH, BOX_HEIGHT, BOX_COLOR, BOX_QTY_RECEIVED, ITEM_STATUS, REMARKS) VALUES ('" + packageNote + "','" + boxNote2 + "','木箱',5,0.000,0.000,0.000,0.000,0.000,'','',0,'');");
            System.out.println("INSERT INTO SAP_BOX_NOTE_DTL (PACKAGE_NOTE, ITEM, BOX_NOTE, PACKAGE_POSNR, MATERIAL_NO, SPECS, QUANTITY, BASIC_UNIT, SRM_CONTRACT_NO, PURCHASE_NO, PURCHASE_NO_ITEM, DELIVERY_NOTE_SAP, DELIVERY_NOTE_SAP_ITEM, DOMESTIC_QTY_RECEIVABLE, DOMESTIC_QTY_RECEIVED) VALUES ('" + packageNote + "','1','" + boxNote1 + "','1','210002450','',10,'PCS','','','','" + "9900000000" + "','10', 1, 10);");
            System.out.println("INSERT INTO SAP_BOX_NOTE_DTL (PACKAGE_NOTE, ITEM, BOX_NOTE, PACKAGE_POSNR, MATERIAL_NO, SPECS, QUANTITY, BASIC_UNIT, SRM_CONTRACT_NO, PURCHASE_NO, PURCHASE_NO_ITEM, DELIVERY_NOTE_SAP, DELIVERY_NOTE_SAP_ITEM, DOMESTIC_QTY_RECEIVABLE, DOMESTIC_QTY_RECEIVED) VALUES ('" + packageNote + "','1','" + boxNote2 + "','2','180001508','',5,'PCS','','','','" + "9900000000" + "','10', 1, 5);");
            System.out.println("INSERT INTO SAP_BOX_NOTE_DTL (PACKAGE_NOTE, ITEM, BOX_NOTE, PACKAGE_POSNR, MATERIAL_NO, SPECS, QUANTITY, BASIC_UNIT, SRM_CONTRACT_NO, PURCHASE_NO, PURCHASE_NO_ITEM, DELIVERY_NOTE_SAP, DELIVERY_NOTE_SAP_ITEM, DOMESTIC_QTY_RECEIVABLE, DOMESTIC_QTY_RECEIVED) VALUES ('" + packageNote + "','1','" + boxNote2 + "','2','210003877','',20,'PCS','','','','" + "9900000000" + "','10', 1, 20);");
            System.out.println("INSERT INTO WHS_INVENTORY_INFO (WERKS, WHS_LOCATION_CODE, QUANTITY, UPDATE_USER, BOX_NOTE) VALUES ('CN01', '1011', 1, '999947', '" + boxNote1 + "');");
            System.out.println("INSERT INTO WHS_INVENTORY_INFO (WERKS, WHS_LOCATION_CODE, QUANTITY, UPDATE_USER, BOX_NOTE) VALUES ('CN01', '1011', 1, '999947', '" + boxNote2 + "');");
            System.out.println("INSERT INTO WHS_STORAGE_INVENTORY (UUID, BOX_NOTE, QUANTITY, AVAILABLE_QTY) VALUES ('b95946ac1dab42b79ade3438acb0b523', '" + boxNote1 + "', 1, 1);");
            System.out.println("INSERT INTO WHS_STORAGE_INVENTORY (UUID, BOX_NOTE, QUANTITY, AVAILABLE_QTY) VALUES ('b95946ac1dab42b79ade3438acb0b523', '" + boxNote2 + "', 1, 1);");

            System.out.println("INSERT INTO SAP_PACKAGE_LIST (PACKAGE_LIST, CUSTOMER, SPARE_PARTS, PLANNED_CABINETS_QTY, FROM_PORT, FROM_PORT_NAME, TO_PORT, TO_PORT_NAME, SHIP_COMPANY, CABINET_MODEL, PLANNER, LOADER, ACTUAL_LOADING_DATE, SPMS_STATUS) VALUES ('" + packageList + "', 'GF03', '否', 2, 'CNFOC', '福州', 'GHTEM', '特马', '', '20GP', 'IT_WURQ', '', '', '0');");
            System.out.println("INSERT INTO SAP_PACKAGE_LIST_DTL (PACKAGE_LIST, ITEM, DATE_OF_LOADING, LOADING_WERKS, LOADING_WHS_LOCATION_CODE, CABINET_SERIAL_NUMBER, GOODS_TYPE, RECEIVING_WERKS, ACTUAL_RECEIVING_WERKS, CABINET_NUMBER, LEAD_SEAL, MATERIAL_NO, SHIPMENT_CATEGORY, PLANNED_PACKING_QTY, BASIC_UNIT, PLANNED_PACKING_NUMBER, PACKING_UNIT, CABINET_WEIGHT, WEIGHT_UNIT, CABINET_VOLUME, VOLUME_UNIT, TRAILER_LINE, TRAILER_LINE_DESC, SPMS_STATUS, WHS_OUT_UUID, TEMP_STORAGE, UNPLANNED, ACTUAL_OPERATE_QTY, CONTAINER_BRAND, COLOR_NUMBER, THICKNESS, ACTUAL_AVG_GROSS_WEIGHT, ACTUAL_PACKING_NUMBER, CUSTOMS_DECLARATION_NUMBER, PACKING_SPEC, LOADING_TYPE) VALUES ('" + packageList + "', '10', '20210701', 'CN01', '1011', '01', 'X', 'GH01', '', '', '', '210002450', '五金_农具五金_铁锹', '10', 'PCS', '10', 'PCS', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '');");
            System.out.println("INSERT INTO SAP_PACKAGE_LIST_DTL (PACKAGE_LIST, ITEM, DATE_OF_LOADING, LOADING_WERKS, LOADING_WHS_LOCATION_CODE, CABINET_SERIAL_NUMBER, GOODS_TYPE, RECEIVING_WERKS, ACTUAL_RECEIVING_WERKS, CABINET_NUMBER, LEAD_SEAL, MATERIAL_NO, SHIPMENT_CATEGORY, PLANNED_PACKING_QTY, BASIC_UNIT, PLANNED_PACKING_NUMBER, PACKING_UNIT, CABINET_WEIGHT, WEIGHT_UNIT, CABINET_VOLUME, VOLUME_UNIT, TRAILER_LINE, TRAILER_LINE_DESC, SPMS_STATUS, WHS_OUT_UUID, TEMP_STORAGE, UNPLANNED, ACTUAL_OPERATE_QTY, CONTAINER_BRAND, COLOR_NUMBER, THICKNESS, ACTUAL_AVG_GROSS_WEIGHT, ACTUAL_PACKING_NUMBER, CUSTOMS_DECLARATION_NUMBER, PACKING_SPEC, LOADING_TYPE) VALUES ('" + packageList + "', '20', '20210701', 'CN01', '1011', '02', 'X', 'GH01', '', '', '', '180001508', '五金_农具五金_铁锹', '5', 'PCS', '5', 'PCS', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '');");
            System.out.println("INSERT INTO SAP_PACKAGE_LIST_DTL (PACKAGE_LIST, ITEM, DATE_OF_LOADING, LOADING_WERKS, LOADING_WHS_LOCATION_CODE, CABINET_SERIAL_NUMBER, GOODS_TYPE, RECEIVING_WERKS, ACTUAL_RECEIVING_WERKS, CABINET_NUMBER, LEAD_SEAL, MATERIAL_NO, SHIPMENT_CATEGORY, PLANNED_PACKING_QTY, BASIC_UNIT, PLANNED_PACKING_NUMBER, PACKING_UNIT, CABINET_WEIGHT, WEIGHT_UNIT, CABINET_VOLUME, VOLUME_UNIT, TRAILER_LINE, TRAILER_LINE_DESC, SPMS_STATUS, WHS_OUT_UUID, TEMP_STORAGE, UNPLANNED, ACTUAL_OPERATE_QTY, CONTAINER_BRAND, COLOR_NUMBER, THICKNESS, ACTUAL_AVG_GROSS_WEIGHT, ACTUAL_PACKING_NUMBER, CUSTOMS_DECLARATION_NUMBER, PACKING_SPEC, LOADING_TYPE) VALUES ('" + packageList + "', '30', '20210701', 'CN01', '1011', '02', 'X', 'GH01', '', '', '', '210003877', '五金_农具五金_铁锹', '20', 'PCS', '20', 'PCS', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '');");

            System.out.println("INSERT INTO SAP_PACKAGE_BOX (PACKAGE_LIST, ITEM, BOX_NOTE) VALUES ('" + packageList + "', '10', '" + boxNote1 + "');");
            System.out.println("INSERT INTO SAP_PACKAGE_BOX (PACKAGE_LIST, ITEM, BOX_NOTE) VALUES ('" + packageList + "', '20', '" + boxNote2 + "');");
            System.out.println("INSERT INTO SAP_PACKAGE_BOX (PACKAGE_LIST, ITEM, BOX_NOTE) VALUES ('" + packageList + "', '30', '" + boxNote2 + "');");
        }
    }


    /** 造贸易货装箱单数据 */
    static void createPackageListM(){
        for (int i = 2; i < 201; i++){
            String packageList = "SP" + String.format("%08d", i);
            System.out.println("\nINSERT INTO SAP_PACKAGE_LIST (PACKAGE_LIST, CUSTOMER, SPARE_PARTS, PLANNED_CABINETS_QTY, FROM_PORT, FROM_PORT_NAME, TO_PORT, TO_PORT_NAME, SHIP_COMPANY, CABINET_MODEL, PLANNER, LOADER, ACTUAL_LOADING_DATE, SPMS_STATUS) VALUES ('" + packageList + "', 'GF03', '否', 2, 'CNFOC', '福州', 'GHTEM', '特马', '', '20GP', 'IT_WURQ', '', '', '0');");

            String [] packageListDtl = {"170000846", "170003115", "210022570", "210022727"};
            for (int j = 0; j < 2; j++ ){
                System.out.println("INSERT INTO SAP_PACKAGE_LIST_DTL (PACKAGE_LIST, ITEM, DATE_OF_LOADING, LOADING_WERKS, LOADING_WHS_LOCATION_CODE, CABINET_SERIAL_NUMBER, GOODS_TYPE, RECEIVING_WERKS, ACTUAL_RECEIVING_WERKS, CABINET_NUMBER, LEAD_SEAL, MATERIAL_NO, SHIPMENT_CATEGORY, PLANNED_PACKING_QTY, BASIC_UNIT, PLANNED_PACKING_NUMBER, PACKING_UNIT, CABINET_WEIGHT, WEIGHT_UNIT, CABINET_VOLUME, VOLUME_UNIT, TRAILER_LINE, TRAILER_LINE_DESC, SPMS_STATUS, WHS_OUT_UUID, TEMP_STORAGE, UNPLANNED, ACTUAL_OPERATE_QTY, CONTAINER_BRAND, COLOR_NUMBER, THICKNESS, ACTUAL_AVG_GROSS_WEIGHT, ACTUAL_PACKING_NUMBER, CUSTOMS_DECLARATION_NUMBER, PACKING_SPEC, LOADING_TYPE) VALUES ('" + packageList + "', '" + (j + 1) * 10 + "', '20210701', 'CN01', '1061', '01', 'M', 'GH01', '', '', '', '" + packageListDtl[j] + "', '五金_农具五金_铁锹', '10', 'PCS', '10', 'PCS', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '');");
            }
            for (int k = 2; k < 4; k++ ){
                System.out.println("INSERT INTO SAP_PACKAGE_LIST_DTL (PACKAGE_LIST, ITEM, DATE_OF_LOADING, LOADING_WERKS, LOADING_WHS_LOCATION_CODE, CABINET_SERIAL_NUMBER, GOODS_TYPE, RECEIVING_WERKS, ACTUAL_RECEIVING_WERKS, CABINET_NUMBER, LEAD_SEAL, MATERIAL_NO, SHIPMENT_CATEGORY, PLANNED_PACKING_QTY, BASIC_UNIT, PLANNED_PACKING_NUMBER, PACKING_UNIT, CABINET_WEIGHT, WEIGHT_UNIT, CABINET_VOLUME, VOLUME_UNIT, TRAILER_LINE, TRAILER_LINE_DESC, SPMS_STATUS, WHS_OUT_UUID, TEMP_STORAGE, UNPLANNED, ACTUAL_OPERATE_QTY, CONTAINER_BRAND, COLOR_NUMBER, THICKNESS, ACTUAL_AVG_GROSS_WEIGHT, ACTUAL_PACKING_NUMBER, CUSTOMS_DECLARATION_NUMBER, PACKING_SPEC, LOADING_TYPE) VALUES ('" + packageList + "', '" + (k + 1) * 10 + "', '20210701', 'CN01', '1011', '02', 'M', 'GH01', '', '', '', '" + packageListDtl[k] + "', '五金_农具五金_铁锹', '10', 'PCS', '10', 'PCS', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '');");
            }
        }
    }

    /** 造备件货送货单、送货单明细、包装单、箱码、箱码明细数据 */
    static void createSapDeliveryNote(){
        for (int i = 0; i < 100; i ++){
            String deliveryNoteSap = "9" + String.format("%09d", i + 1);
            String packageNote = "SP-12345678" + String.format("%03d", i + 1);
            String deliveryNoteSrm = "91234567" + String.format("%03d", i + 1);
            String boxNote1 = packageNote + "-0102";
            String boxNote2 = packageNote + "-0202";
            System.out.println("\nINSERT INTO SAP_DELIVERY_NOTE (DELIVERY_NOTE_SAP, PLANNED_ARRIVAL_DATE, DELIVERY_TYPE, DELIVERY_NOTE_SRM, CREATE_DATE_SAP, SPMS_MARK, SUPPLIER_CODE, SUPPLIER_DESC, SPMS_STATUS, PACKAGE_NOTE) VALUES ('" + deliveryNoteSap + "', '20210701', 'EL', '01234567891', '20210630', '', '0000102644', 'WEnnER', '', '" + packageNote + "');");
            System.out.println("INSERT INTO SAP_PACKAGE_NOTE (PACKAGE_NOTE, DELIVERY_NOTE_SRM, DELIVERY_NOTE_SAP, SUPPLIER_CODE, TOTAL_VOLUME, TOTAL_WEIGHT, LOAD_BEGIN_TIME, LOAD_END_TIME, TRANSPORTER, CONTRACTOR_INFO, RECEIVER, RECEIVER_INFO, RECEIVING_ADDRESS, SPMS_CONTRACT_NOTE, SPMS_MARK) VALUES ('" + packageNote + "','" + deliveryNoteSrm + "','" + deliveryNoteSap + "','0000102689',0.000,0.000,'','','','','13433914099','叶晓丽/ 陆玉芳','广东省南沙区东涌镇市南路81号广州豪剑集团（集团园区内3号仓库）','','S');");
            System.out.println("INSERT INTO SAP_BOX_NOTE (PACKAGE_NOTE, BOX_NOTE, BOX_MATERIAL_NAME, TOTAL_QTY, BOX_GROSS_WEIGHT, BOX_VOLUME, BOX_LENGTH, BOX_WIDTH, BOX_HEIGHT, BOX_COLOR, BOX_QTY_RECEIVED, ITEM_STATUS, REMARKS) VALUES ('" + packageNote + "','" + boxNote1 + "','木箱',5,0.000,0.000,0.000,0.000,0.000,'','',0,'');");
            System.out.println("INSERT INTO SAP_BOX_NOTE (PACKAGE_NOTE, BOX_NOTE, BOX_MATERIAL_NAME, TOTAL_QTY, BOX_GROSS_WEIGHT, BOX_VOLUME, BOX_LENGTH, BOX_WIDTH, BOX_HEIGHT, BOX_COLOR, BOX_QTY_RECEIVED, ITEM_STATUS, REMARKS) VALUES ('" + packageNote + "','" + boxNote2 + "','木箱',5,0.000,0.000,0.000,0.000,0.000,'','',0,'');");
            System.out.println("INSERT INTO SAP_BOX_NOTE_DTL (PACKAGE_NOTE, ITEM, BOX_NOTE, PACKAGE_POSNR, MATERIAL_NO, SPECS, QUANTITY, BASIC_UNIT, SRM_CONTRACT_NO, PURCHASE_NO, PURCHASE_NO_ITEM, DELIVERY_NOTE_SAP, DELIVERY_NOTE_SAP_ITEM) VALUES ('" + packageNote + "','1','" + boxNote1 + "','1','210002450','',10,'PCS','','','','" + deliveryNoteSap + "','10');");
            System.out.println("INSERT INTO SAP_BOX_NOTE_DTL (PACKAGE_NOTE, ITEM, BOX_NOTE, PACKAGE_POSNR, MATERIAL_NO, SPECS, QUANTITY, BASIC_UNIT, SRM_CONTRACT_NO, PURCHASE_NO, PURCHASE_NO_ITEM, DELIVERY_NOTE_SAP, DELIVERY_NOTE_SAP_ITEM) VALUES ('" + packageNote + "','1','" + boxNote2 + "','2','180001508','',5,'PCS','','','','" + deliveryNoteSap + "','20');");
            System.out.println("INSERT INTO SAP_BOX_NOTE_DTL (PACKAGE_NOTE, ITEM, BOX_NOTE, PACKAGE_POSNR, MATERIAL_NO, SPECS, QUANTITY, BASIC_UNIT, SRM_CONTRACT_NO, PURCHASE_NO, PURCHASE_NO_ITEM, DELIVERY_NOTE_SAP, DELIVERY_NOTE_SAP_ITEM) VALUES ('" + packageNote + "','1','" + boxNote2 + "','2','210003877','',20,'PCS','','','','" + deliveryNoteSap + "','30');");
            System.out.println("INSERT INTO SAP_DELIVERY_NOTE_DTL (DELIVERY_NOTE_SAP, DELIVERY_NOTE_SAP_ITEM, PURCHASE_GROUP, PURCHASE_GROUP_NAME, MATERIAL_NO, DELIVERY_QTY, DELIVERY_UNIT, WERKS, WHS_LOCATION_CODE, RECEIVED_QTY, ITEM_STATUS, OVER_DELIVERY_LIMIT, UNDER_DELIVERY_LIMIT, UNIT_SALES) VALUES ('" + deliveryNoteSap + "','10','100','','210002450',10,'PCS','CN01','1061','',0,0,0,'');");
            System.out.println("INSERT INTO SAP_DELIVERY_NOTE_DTL (DELIVERY_NOTE_SAP, DELIVERY_NOTE_SAP_ITEM, PURCHASE_GROUP, PURCHASE_GROUP_NAME, MATERIAL_NO, DELIVERY_QTY, DELIVERY_UNIT, WERKS, WHS_LOCATION_CODE, RECEIVED_QTY, ITEM_STATUS, OVER_DELIVERY_LIMIT, UNDER_DELIVERY_LIMIT, UNIT_SALES) VALUES ('" + deliveryNoteSap + "','20','100','','180001508',5,'PCS','CN01','1061','',0,0,0,'');");
            System.out.println("INSERT INTO SAP_DELIVERY_NOTE_DTL (DELIVERY_NOTE_SAP, DELIVERY_NOTE_SAP_ITEM, PURCHASE_GROUP, PURCHASE_GROUP_NAME, MATERIAL_NO, DELIVERY_QTY, DELIVERY_UNIT, WERKS, WHS_LOCATION_CODE, RECEIVED_QTY, ITEM_STATUS, OVER_DELIVERY_LIMIT, UNDER_DELIVERY_LIMIT, UNIT_SALES) VALUES ('" + deliveryNoteSap + "','30','100','','210003877',20,'PCS','CN01','1061','',0,0,0,'');");
        }

        for (int i = 100; i < 200; i ++){
            String deliveryNoteSap = "9" + String.format("%09d", i + 1);
            String packageNote = "SP-12345678" + String.format("%03d", i + 1);
            String deliveryNoteSrm = "91234567" + String.format("%03d", i + 1);
            String boxNote1 = packageNote + "-0102";
            String boxNote2 = packageNote + "-0202";
            System.out.println("\nINSERT INTO SAP_DELIVERY_NOTE (DELIVERY_NOTE_SAP, PLANNED_ARRIVAL_DATE, DELIVERY_TYPE, DELIVERY_NOTE_SRM, CREATE_DATE_SAP, SPMS_MARK, SUPPLIER_CODE, SUPPLIER_DESC, SPMS_STATUS, PACKAGE_NOTE) VALUES ('" + deliveryNoteSap + "', '20210701', 'EL', '01234567891', '20210630', '', '0000102644', 'WEnnER', '', '" + packageNote + "');");
            System.out.println("INSERT INTO SAP_PACKAGE_NOTE (PACKAGE_NOTE, DELIVERY_NOTE_SRM, DELIVERY_NOTE_SAP, SUPPLIER_CODE, TOTAL_VOLUME, TOTAL_WEIGHT, LOAD_BEGIN_TIME, LOAD_END_TIME, TRANSPORTER, CONTRACTOR_INFO, RECEIVER, RECEIVER_INFO, RECEIVING_ADDRESS, SPMS_CONTRACT_NOTE, SPMS_MARK) VALUES ('" + packageNote + "','" + deliveryNoteSrm + "','" + deliveryNoteSap + "','0000102689',0.000,0.000,'','','','','13433914099','叶晓丽/ 陆玉芳','广东省南沙区东涌镇市南路81号广州豪剑集团（集团园区内3号仓库）','','S');");
            System.out.println("INSERT INTO SAP_BOX_NOTE (PACKAGE_NOTE, BOX_NOTE, BOX_MATERIAL_NAME, TOTAL_QTY, BOX_GROSS_WEIGHT, BOX_VOLUME, BOX_LENGTH, BOX_WIDTH, BOX_HEIGHT, BOX_COLOR, BOX_QTY_RECEIVED, ITEM_STATUS, REMARKS) VALUES ('" + packageNote + "','" + boxNote1 + "','木箱',5,0.000,0.000,0.000,0.000,0.000,'','',0,'');");
            System.out.println("INSERT INTO SAP_BOX_NOTE (PACKAGE_NOTE, BOX_NOTE, BOX_MATERIAL_NAME, TOTAL_QTY, BOX_GROSS_WEIGHT, BOX_VOLUME, BOX_LENGTH, BOX_WIDTH, BOX_HEIGHT, BOX_COLOR, BOX_QTY_RECEIVED, ITEM_STATUS, REMARKS) VALUES ('" + packageNote + "','" + boxNote2 + "','木箱',5,0.000,0.000,0.000,0.000,0.000,'','',0,'');");
            System.out.println("INSERT INTO SAP_BOX_NOTE_DTL (PACKAGE_NOTE, ITEM, BOX_NOTE, PACKAGE_POSNR, MATERIAL_NO, SPECS, QUANTITY, BASIC_UNIT, SRM_CONTRACT_NO, PURCHASE_NO, PURCHASE_NO_ITEM, DELIVERY_NOTE_SAP, DELIVERY_NOTE_SAP_ITEM) VALUES ('" + packageNote + "','1','" + boxNote1 + "','1','210002450','',10,'PCS','','','','" + deliveryNoteSap + "','10');");
            System.out.println("INSERT INTO SAP_BOX_NOTE_DTL (PACKAGE_NOTE, ITEM, BOX_NOTE, PACKAGE_POSNR, MATERIAL_NO, SPECS, QUANTITY, BASIC_UNIT, SRM_CONTRACT_NO, PURCHASE_NO, PURCHASE_NO_ITEM, DELIVERY_NOTE_SAP, DELIVERY_NOTE_SAP_ITEM) VALUES ('" + packageNote + "','1','" + boxNote2 + "','2','180001508','',5,'PCS','','','','" + deliveryNoteSap + "','20');");
            System.out.println("INSERT INTO SAP_BOX_NOTE_DTL (PACKAGE_NOTE, ITEM, BOX_NOTE, PACKAGE_POSNR, MATERIAL_NO, SPECS, QUANTITY, BASIC_UNIT, SRM_CONTRACT_NO, PURCHASE_NO, PURCHASE_NO_ITEM, DELIVERY_NOTE_SAP, DELIVERY_NOTE_SAP_ITEM) VALUES ('" + packageNote + "','1','" + boxNote2 + "','2','210003877','',20,'PCS','','','','" + deliveryNoteSap + "','30');");
            System.out.println("INSERT INTO SAP_DELIVERY_NOTE_DTL (DELIVERY_NOTE_SAP, DELIVERY_NOTE_SAP_ITEM, PURCHASE_GROUP, PURCHASE_GROUP_NAME, MATERIAL_NO, DELIVERY_QTY, DELIVERY_UNIT, WERKS, WHS_LOCATION_CODE, RECEIVED_QTY, ITEM_STATUS, OVER_DELIVERY_LIMIT, UNDER_DELIVERY_LIMIT, UNIT_SALES) VALUES ('" + deliveryNoteSap + "','10','100','','210002450',10,'PCS','CN01','1011','',0,0,0,'');");
            System.out.println("INSERT INTO SAP_DELIVERY_NOTE_DTL (DELIVERY_NOTE_SAP, DELIVERY_NOTE_SAP_ITEM, PURCHASE_GROUP, PURCHASE_GROUP_NAME, MATERIAL_NO, DELIVERY_QTY, DELIVERY_UNIT, WERKS, WHS_LOCATION_CODE, RECEIVED_QTY, ITEM_STATUS, OVER_DELIVERY_LIMIT, UNDER_DELIVERY_LIMIT, UNIT_SALES) VALUES ('" + deliveryNoteSap + "','20','100','','180001508',5,'PCS','CN01','1011','',0,0,0,'');");
            System.out.println("INSERT INTO SAP_DELIVERY_NOTE_DTL (DELIVERY_NOTE_SAP, DELIVERY_NOTE_SAP_ITEM, PURCHASE_GROUP, PURCHASE_GROUP_NAME, MATERIAL_NO, DELIVERY_QTY, DELIVERY_UNIT, WERKS, WHS_LOCATION_CODE, RECEIVED_QTY, ITEM_STATUS, OVER_DELIVERY_LIMIT, UNDER_DELIVERY_LIMIT, UNIT_SALES) VALUES ('" + deliveryNoteSap + "','30','100','','210003877',20,'PCS','CN01','1011','',0,0,0,'');");
        }
    }



}